/*
 * @Author: nainaiyi s15037075861@163.com
 * @Date: 2022-09-05 11:43:17
 * @LastEditors: nainaiyi s15037075861@163.com
 * @LastEditTime: 2022-09-05 14:43:28
 * @FilePath: \shopapp\src\store\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createStore, applyMiddleware, combineReducers } from "redux"
import thunk from "redux-thunk"
import logger from "redux-logger"
import { homeReducer } from "./home/homeReducer"
import { shopReducer } from "./shop/shopReducer"

const reducers = combineReducers({
    homeReducer,
    shopReducer
})

export const store = createStore(reducers, applyMiddleware(thunk, logger))
export type RootState = ReturnType<typeof store.getState>